﻿<%@ Page Title="Lista de Cursos" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ConsultarCurso.aspx.cs" Inherits="CursoUNICEUB.ConsultarCurso" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Lista de Cursos</h1>
    <p>

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="LinqDataSource1" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="Codigo" HeaderText="Código" ReadOnly="True" 
                    SortExpression="Codigo" />
                <asp:TemplateField HeaderText="Descrição">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnbNome" Text='<%# Eval("Descricao") %>' OnClick="lnbNome_Click" CommandArgument='<%# Eval("Codigo") %>'
                            runat="server"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DescricaoStatus" HeaderText="Status" ReadOnly="True" 
                    SortExpression="DescricaoStatus" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="FastDATA.DCCursoDataContext" EntityTypeName="" 
            Select="new (Descricao, Codigo, DescricaoStatus)" TableName="DECursos">
        </asp:LinqDataSource>

    </p>
</asp:Content>
